import 'package:kmxy_base/base/base_package.dart';
import 'package:kmxy_base/page/setting/net_log/net_log_page_state.dart';

/// log界面
// ignore: must_be_immutable
class NetLogPage extends BasePage {
  NetLogPage({Key? key, arguments}) : super(key: key, arguments: arguments);
  @override
  NetLogPageView createState() => NetLogPageView();
}

class NetLogPageView extends NetLogPageState {
  @override
  Widget setPageContent(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        backgroundColor: Colors.white,
        foregroundColor: Colors.black,
        title: Text(
          '网络请求LOG',
          style: TextStyle(
            color: Colors.black,
            fontSize: 16.sp,
            fontWeight: FontWeight.w700,
          ),
        ),
        actions: [
          Container(
            margin: EdgeInsets.only(right: 10.w),
            alignment: Alignment.center,
            child: InkWell(
              onTap: clean,
              child: const Text('清空'),
            ),
          ),
        ],
      ),
      body: SingleChildScrollView(
        controller: scrollController,
        //长按自由复制的文本
        child: SelectableText(
          log,
          style: TextStyle(fontSize: 12.w, color: Colors.red),
        ),
      ),
    );
  }
}
